package com.xu.boot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class ViewController {

    @GetMapping("/thy")
    public String view(Model model){
        // model 中的数据会被放在请求域中 request.setAttribute(key, value)
        model.addAttribute("msg", "你好，thymeleaf");
        model.addAttribute("link", "http://www.baidu.com");
        return "success";
    }

}
